#ifndef LOGINRESPONSEMESSAGE_H
#define LOGINRESPONSEMESSAGE_H

#include "./entities/message/superClass/message.h"

/*
Json数据格式
{
    "messageType": [LoginResponse](int)
    "status": ["success", "failure"](string)
    "reason": ["verified pass", "not found userId", "password wrong", "already online"](string)
}
*/
class LoginResponseMessage : public Message
{
public:
    LoginResponseMessage() = delete;

    LoginResponseMessage(const Status& status, const Reason& reason);
    LoginResponseMessage(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    Status getStatus() const;
    Reason getReason() const;

private:
    Status m_status;
    Reason m_reason;

};

// 编译时注册
Q_DECLARE_METATYPE(LoginResponseMessage)

#endif // LOGINRESPONSEMESSAGE_H
